'use strict';
module.exports = app => {
  const { STRING, INTEGER, DATE} = app.Sequelize;
  const Model = app.model.define('test', {
    testId: { 
      type: INTEGER, 
      primaryKey: true, 
      autoIncrement: true, 
      comment: '测试ID'
    },
    testName: {
      type: STRING(20),
      allowNull: false,
      comment: '测试名'
    },
    remark: {
      type: STRING(500),
      allowNull: false,
      comment: '描述'
    },
    createdAt: {
      type: DATE,
      allowNull: true,
      comment: '创建时间'
    },
    updatedAt: {
      type: DATE,
      allowNull: true,
      comment: '更新时间'
    }
  },{
    tableName: 'test'
  });

  return Model;
}